<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="huoyun" uri="/huoyun"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>修改企业信息</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/theme/css/main.css">
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/car/js/jarea-by-chengxin.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/car/js/publish-car-tzh.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/theme/js/calendar/WdatePicker.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/theme/js/additional-methods.js"
			charset="utf-8"></script>

		<script type="text/javascript">
	$(document).ready(function() {
		$("#editCompany").validate( {
			errorPlacement : function(error, element) {
				//element.parent("td").append(error);
			element.attr("title", error.html());
		},
		rules : {
			"company.name" : {
				required : true
			},
			"company.province" : {
				required : true
			},
			"company.city" : {
				required : true
			},
			"company.town" : {
				required : true
			},
			"company.address" : {
				required : true
			},
			"companyPerson.name" : {
				required : true,
				maxlength : 10,
				chinese : true
			},
			"companyPerson.phone" : {
				required : true,
				number : true,
				mobile : true
			},
			"companyPerson.crashPhone" : {
				required : true,
				number : true,
				mobile : true
			}

		},

		messages : {
			"company.name" : {
				required : "请输入公司名称"
			},
			"company.province" : {
				required : "请选择起运地省市区"
			},
			"company.city" : {
				required : "请选择起运地省市区"
			},
			"company.town" : {
				required : "请选择起运地省市区"
			},
			"company.address" : {
				required : "请填写公司所在街道地址，必须在5-60个字之间，且不全为数字字母"
			},
			"companyPerson.name" : {
				required : "请输入联系人姓名",
				maxlength : "收货人姓名不能超过10个字符",
				chinese : "只能输入中文"
			},
			"companyPerson.phone" : {
				required : "请输入联系人电话"
			},
			"companyPerson.crashPhone" : {
				required : "请输入联系人紧急联系方式"
			}
		}

		//debug : true
				});
	});
</script>

		<style type="text/css">
.red {
	color: red;
}
</style>
	</head>

	<body>

		<div>
			<jsp:include page="../nav.jsp">
				<jsp:param value="nav_main" name="nav" />
			</jsp:include>
		</div>
		<div class="realCer">

			<!--主体部分-->
			<div class="realMain clearfix mt10">

				<!--左侧菜单-->
				<div class="realLeft" id="meunLeft">
					<jsp:include page="../leftMenu.jsp">
						<jsp:param value="con_nav_account" name="con_nav" />
						<jsp:param value="userInfoManagement" name="selectMenu" />
					</jsp:include>
				</div>
				<!--中由-->
				<div class="realRight ml10">
					<!--中间-->
					<div class="realR_left">
						<div class="box">
							<div class="tit">
								修改基本信息
							</div>
							<div class="con">
								<div class="form_wrap clearfix">
									<div style="color: red; margin-left: 100px;">
										<s:property value="resultMsg" />
										<s:fielderror></s:fielderror>
									</div>

									<form method="post" id="editCompany" name="editCompany"
										action="company/editCompany.action" enctype="multipart/form-data">
										<table class="tableForm">
											<tbody>
												<tr>
													<td class="tdLabel" width="100">
														<span class="red">* </span>公司名称：
													</td>
													<td class="tdValue">
														<input class="text" name="company.name" type="text"
															value="<s:property value="company.name"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														公司类型：
													</td>
													<td class="tdValue">
														<huoyun:customSelect id="companyType" name="company.type"
															mode="companyType" value="${company.type}" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														公司商标
													</td>
													<td>
														<s:if test="company.logoImg!=null">
															&nbsp;&nbsp;<img style="width:80px;height:80px" src="${pageContext.request.contextPath}<s:property value="company.logoImg"/>"/>
															&nbsp;<a href="${pageContext.request.contextPath }/company/preChangeLogo.action">修改商标</a>
														</s:if>
														<s:else>
															<input type="file" name="logoImgFile" id="logoImgFile"
																class="inputtext" />
														</s:else>
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="red">* </span>公司地址：
													</td>
													<td class="tdValue">
														<huoyun:regionSelect provinceName="company.province"
															cityName="company.city" townName="company.town"
															provinceValue="${company.province }"
															cityValue="${company.city }" townValue="${company.town }" />

													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="red">* </span>街道地址：
													</td>
													<td class="tdValue">
														<input class="text" name="company.address" type="text"
															value="<s:property value="company.address"/>" style="width:300px;text-align:left" />
													
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														注册资本金：
													</td>

													<td class="tdValue">
														<input class="text" name="company.capital" type="text"
															value="<s:property value="company.capital"/>" />元
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														组织机构代码：
													</td>

													<td class="tdValue">
														<input class="text" name="" type="text"
															value="<s:property value="company.code"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														营业执照注册号：
													</td>

													<td class="tdValue">
														<input class="text" name="company.licenseNo" type="text"
															value="<s:property value="company.licenseNo"/>" />
													</td>
												</tr>

												<tr>
													<td class="tdLabel" width="100">
														税务登记号：
													</td>

													<td class="tdValue">
														<input class="text" name="company.taxNo" type="text"
															value="<s:property value="company.taxNo"/>" />
													</td>
												</tr>

												<tr>
													<td class="tdLabel" width="100">
														联系电话：
													</td>

													<td class="tdValue">
														<input class="text" name="company.telephone" type="text"
															value="<s:property value="company.phone"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														移动电话：
													</td>

													<td class="tdValue">
														<input class="text" name="company.mobilephone" type="text"
															value="<s:property value="company.mobilephone"/>" />
													</td>
												</tr>
												<tr>
													<td colspan="2">
														<h2>
															企业法人信息
														</h2>
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														姓 名：
													</td>
													<td class="tdValue">
														<input class="text" name="company.legalPersonName"
															type="text"
															value="<s:property value="company.legalPersonName"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														身份证号码：
													</td>
													<td class="tdValue">
														<input class="text" name="company.legalPersonID"
															type="text"
															value="<s:property value="company.legalPersonID"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														联系电话：
													</td>
													<td class="tdValue">
														<input class="text" name="company.legalPersonPhone"
															type="text"
															value="<s:property value="company.legalPersonPhone"/>" />
													</td>
												</tr>
												<tr>
													<td colspan="2">
														<h2>
															企业联系人信息
														</h2>
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="red">* </span>姓 名：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.name" type="text"
															value="<s:property value="companyPerson.name"/>" />
													</td>
												</tr>

												<tr>
													<td class="tdLabel" width="100">
														职 务：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.post" type="text"
															value="<s:property value="companyPerson.post"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="red">* </span>联系方式：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.phone" type="text"
															value="<s:property value="companyPerson.phone"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														<span class="red">* </span>紧急联系方式：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.crashPhone"
															type="text"
															value="<s:property value="companyPerson.crashPhone"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														邮箱：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.email" type="text"
															value="<s:property value="companyPerson.email"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														传真：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.fax" type="text"
															value="<s:property value="companyPerson.fax"/>" />
													</td>
												</tr>
												<tr>
													<td class="tdLabel" width="100">
														QQ：
													</td>
													<td class="tdValue">
														<input class="text" name="companyPerson.qq" type="text"
															value="<s:property value="companyPerson.qq"/>" />
													</td>
												</tr>
											</tbody>
										</table>

										<input type="submit" name="regCompanyCargo"
											id="regCompanyCargo" value="提交" class="submit_button" />
										<input type="button" id='Giveup'
											class="Giveup tosnmiddle_btns" value="取消">
									</form>

								</div>
							</div>
						</div>
					</div>
					<!-- 中间 -->
				</div>
			</div>
			<div>
				<jsp:include page="/footer.jsp"></jsp:include>
			</div>
	</body>
</html>
